from flask_migrate import Migrate
from injector import Injector

from config import Config
from internal.router import Router
from internal.server import Http
from pkg.sqlalchemy import SQLAlchemy
from .module import ExtensionModule

injector = Injector([ExtensionModule])
config = Config()
app = Http(__name__, config=config, db=injector.get(SQLAlchemy), router=injector.get(Router),
           migrate=injector.get(Migrate))
celery = app.extensions["celery"]
print(celery)
if __name__ == "__main__":
    app.run(debug=True)
